<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:i="http://www.ikis.com/tags">
    <h:head>
        <title>Facelet Title</title>

        <script>
            function open(){
                acc.unselect(0);
                acc.select(1);
            }
        </script>
    </h:head>
    <ui:composition template="ikisTemplate.xhtml">
        <ui:define name="top">
            Semantik İkis
            <h:panelGrid columns="2" style="float: right;">    
                <h:outputLabel value="Dil:"/>
                <p:selectOneButton value="#{PageBean.lang}" valueChangeListener="#{PageBean.redirect()}" >  
                    <f:selectItem itemLabel="Türkçe" itemValue="TR"/>  
                    <f:selectItem itemLabel="English" itemValue="EN"/> 
                </p:selectOneButton>  
            </h:panelGrid>
        </ui:define>
        <ui:define id="data" name="content">

            <p:fieldset legend="Tablo" style="width: 100%">
                    <p:dataTable  emptyMessage="Kayıt Bulunamadı" paginatorAlwaysVisible="true" editable="false" value="#{PageBean.datas}" var="data" paginator="true" rows="10"  
                        paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                        rowsPerPageTemplate="5,10,15">   
                        <p:column headerText="Düzey" sortBy="#{data.belongsTo}">
                            #{data.belongsTo.trLabel}
                        </p:column>
                        <p:column headerText="Üstveri" sortBy="#{data.property.trLabel}">
                            #{data.property.trLabel}
                        </p:column>
                        <p:column headerText="Baslık" sortBy="#{data.header}">
                            #{data.header}
                        </p:column>
                        <p:column headerText="Sektör" sortBy="#{data.sector}">
                            #{data.sector}
                        </p:column>
                        <p:column headerText="Yıl" sortBy="#{data.year}">
                            #{data.year}
                        </p:column>
                        <p:column headerText="Dönem" sortBy="#{data.period}">
                            #{data.period}
                        </p:column>
                        <p:column headerText="Kaynak" sortBy="#{data.resource}">
                            #{data.resource}
                        </p:column>
                        <p:column headerText="Veri" sortBy="#{data.value}">
                            #{data.value}
                        </p:column>
                    </p:dataTable>
            </p:fieldset>
        </ui:define>
    </ui:composition>
</html>

